package cn.kgc.mushroomcommon.api;

import cn.kgc.mushroomcommon.pojo.*;
import cn.kgc.mushroomcommon.vo.ShopVO;
import cn.kgc.mushroomcommon.vo.UserSuccessVO;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;


import java.util.*;


@FeignClient("MUSHROOM-MANAGER")
public interface ManagerRemoteService {



    @RequestMapping("/comodity/manager/selectCommodityAndDetail")
    public Commodity selectCommodityAndDetail(@RequestParam("id") Integer id);

    @RequestMapping("/comodity/manager/selectByid")
    public List<Commodity> selectByid(@RequestParam("tidcommtype")Integer tidcommtype);

    @RequestMapping("/commodity/selectcomm")
    public List<Commodity> selectcomm();

    @RequestMapping("/commodity/selectTop")
    public List<Commodity> selectTop();

    @RequestMapping("/commodity/select/commodity/commandtype")
    public List<Commodity> selectCommonities(@RequestParam("commOrTypeName")String commOrTypeName,
                                             @RequestParam("tiaojian")Integer tiaojian,
                                             @RequestParam("smallMoney")Integer smallMoney,
                                             @RequestParam("bigMoney")Integer bigMoney);

    @RequestMapping("/shop/manager/selectAll")
    public List<Shop> selectAll();

    @RequestMapping("/shoppingcar/manager/query/shoppingcar/list")
    public List<Shoppingcar> selectShoppingCarList();

    @RequestMapping("/shoppingcar/manager/batch/remove")
    public Integer batchRemove(List<Integer> shoppingCarIdList);

    @RequestMapping("/shoppingcar/manager/query/shoppingcar/list/by/id/list")
    public List<Shoppingcar> getShoppingCarListByIdList(List<Integer> shoppingCarIdList) ;

    @RequestMapping("/type/selectType")
    public List<Type> selectType();

    @RequestMapping("/user/manager/login")
    public ResultEntity<UserSuccessVO> login(
            @RequestParam("account") String account,
            @RequestParam("password") String password);

    @RequestMapping("/user/manager/logout")
    public ResultEntity<String> logout(@RequestParam("token") String token) ;

    @RequestMapping("/user/manager/checkCode")
    public ResultEntity<String> checkCode(@RequestParam("code") String code,@RequestParam("phone") String phone) ;

    @RequestMapping("/user/manager/register")
    public ResultEntity<String> register(@RequestBody User user);

    @RequestMapping("/user/manager/send/code")
    public ResultEntity<String> sendCode(@RequestParam("phone") String phone) ;

    @RequestMapping("/type/selectshoptype")
    public List<Type> selectshoptype(@RequestParam("sid")Integer sid);

    @RequestMapping("/shop/manager/selectByid")
    public Shop selectById(@RequestParam("id")Integer id);


    @RequestMapping("/commodity/selectshopallname")
    public List<Commodity> selectshopallname(@RequestParam("tid")Integer tid);

    @RequestMapping("/shop/manager/selectShopComId")
    public Shop selectShopComId(@RequestParam("id")Integer id);

    @RequestMapping("/shop/manager/insertshopanduser")
    public Map<String,Object> insertshopanduser(@RequestParam("shopcollid")Integer shopcollid, @RequestParam("userid")Integer userid);

    @RequestMapping("/order/selectOrderAndComm")
    public List<Order> selectOrderAndComm(@RequestParam("ordenum")String ordenum);

    @RequestMapping("/order/deleteOrder")
    public Map<String,Object> deleteOrder(@RequestParam("id")Integer id);

    @RequestMapping("/address/manager/query/address/view/list/by/uid")
    public List<Address> selectAddressListByView(@RequestParam(value = "uidaddress",defaultValue = "0") Integer uidaddress);

    @RequestMapping("/order/insertOrder")
    public Integer insertOrder(@RequestBody Order order);

    @RequestMapping("/address/manager/insertaddress")
    public Map<String,Object> insertaddress(@RequestBody Address address);

    @RequestMapping("/address/manager/deleteaddress")
    public Map<String,Object> deleteaddress(@RequestParam("id")Integer id);

    @RequestMapping("/address/manager/updateaddress")
    public Map<String,Object> updateaddress(@RequestParam("id")Integer id);

    @RequestMapping("/address/manager/selectByStatus")
    public Address selectByStatus(@RequestParam("status")Integer status);

    @RequestMapping("/address/manager/updatemoren")
    public Map<String,Object> updatemoren(@RequestParam("id")Integer id);

    @RequestMapping("/shop/manager/selectColl")
    public List<Coll> selectColl(@RequestParam("userid")Integer userid);

    @RequestMapping("/user/manager/getUserByPhone")
    public ResultEntity<UserSuccessVO> getUserByPhone(@RequestParam("phone") String phone);

    @RequestMapping("/user/manager/checkCodeByPhone")
    public ResultEntity<String> checkCodeByPhone(@RequestParam("code") String code,@RequestParam("phone") String phone);

    @RequestMapping("/common/manager/selectCommon")
    public List<Common> selectCommon(@RequestParam("id")Integer id);

    @RequestMapping("/shoppingcar/manager/addShopCar")
    public ResultEntity<String> addShopCar(@RequestBody Shoppingcar shoppingcar);

    @RequestMapping("/shop/manager/selectshopbyname")
    public List<ShopVO> selectShopByName(@RequestParam("shopName")String shopName);
}
